package tonytech.wordcode.service;

import java.io.File;

/**
 * Created by hkl
 * 服务提供工厂，提供所有服务的对象，单例
 */
public enum  ServiceFactory {
    INSTANCE;
    public AbstractDirectoryScannerService getDirectoryScanner(File dir){
        return DirectoryScanner.newInstance(dir);
    }
    public FileInfoScannerServicempl getFileContentScanner(File file){
        return new FileInfoScanner(file);
    }

    public DocWriterServiceImpl getDocWriter(File file){
        return new DocWriterService(file);
    }

}
